﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="StockTraderRI.App"
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
             xmlns:Behaviors="clr-namespace:StockTraderRI.Infrastructure.Behaviors;assembly=StockTraderRI.Infrastructure"
             xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:DataPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
             xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
             mc:Ignorable="d">
    <Application.Resources>

        <ControlTemplate x:Key="CustomTabItemTemplate" TargetType="Controls:TabItem">
            <Grid Width="Auto" Height="Auto" x:Name="TabItemRoot" Margin="10,0,10,0">
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.3000000"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="Disabled"/>
                        <vsm:VisualState x:Name="Normal" />
                        <vsm:VisualState x:Name="MouseOver" />
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Focused" />
                        <vsm:VisualState x:Name="Unfocused" />
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="SelectionStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.3000000"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="Selected" >
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Unselected" >
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <TextBlock x:Name="textBlock" Text="{Binding Path=HeaderInfo}" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Trebuchet MS" FontSize="14" Foreground="#FFFFFFFF" Margin="13,5,13,5" Cursor="Hand" />
                <TextBlock x:Name="textBlock1" Text="{Binding Path=HeaderInfo}" HorizontalAlignment="Center" Margin="13,5,13,5" VerticalAlignment="Center" FontFamily="Trebuchet MS" FontSize="14" Foreground="#FFB2B2B2" Visibility="Visible" Opacity="0" Cursor="Hand" />
                <Border x:Name="border" Height="Auto" Padding="0,0,0,0" Opacity="0">
                    <Border.Background>
                        <RadialGradientBrush>
                            <GradientStop Color="#A3FFFFFF" Offset="0"/>
                            <GradientStop Color="#00FFFFFF" Offset="1"/>
                        </RadialGradientBrush>
                    </Border.Background>
                </Border>
            </Grid>
        </ControlTemplate>

        <Style x:Key="CustomTabItemStyle" TargetType="Controls:TabItem">
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Background" Value="#FF1F3B53"/>
            <Setter Property="BorderBrush" Value="#FFA3AEB9"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Padding" Value="6,2,6,2"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="MinWidth" Value="5"/>
            <Setter Property="MinHeight" Value="5"/>
            <Setter Property="Template" Value="{StaticResource CustomTabItemTemplate}" />
            <Setter Property="FontFamily" Value="Trebuchet MS"/>
        </Style>
        
        <ControlTemplate x:Key="AddButtonTemplate" TargetType="Button">
            <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused"/>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled"/>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <Grid>
                    <Path x:Name="path1" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Margin="1,-1,1,3">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform Angle="-90"/>
                                <TranslateTransform Y="2" X="0"/>
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                    <Path x:Name="path" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="#FF032E9C" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Opacity="0" StrokeThickness="0" Margin="1,-1,1,3">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform Angle="-90"/>
                                <TranslateTransform Y="2" X="0"/>
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                </Grid>
            </Border>
        </ControlTemplate>

        <ControlTemplate x:Key="RemoveXButtonTemplate" TargetType="Button">
            <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused"/>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled"/>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <Grid RenderTransformOrigin="0.5,0.5">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform Angle="45"/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <Path x:Name="path1" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Margin="1,-1,1,3">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform Angle="-90"/>
                                <TranslateTransform Y="2" X="0"/>
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                    <Path x:Name="path" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="#FFD60808" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Opacity="0" StrokeThickness="0" Margin="1,-1,1,3">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform Angle="-90"/>
                                <TranslateTransform Y="2" X="0"/>
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                </Grid>
            </Border>
        </ControlTemplate>

        <ControlTemplate x:Key="RemoveButtonTemplate" TargetType="Button">
            <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused"/>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled"/>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <Grid>
                    <Path x:Name="path1" Height="4" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,16.5 L7.5,16.5 z" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    <Path x:Name="path" RenderTransformOrigin="0.5,0.5" Fill="#FFD60808" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,16.5 L7.5,16.5 z" Opacity="0" Height="4" Width="16"/>
                </Grid>
            </Border>
        </ControlTemplate>

        <ControlTemplate x:Key="CloseButtonStyle" TargetType="Button">

            <Grid>
                <Border x:Name="border" Width="18" Height="18" BorderThickness="2,2,2,2" BorderBrush="#FFB7B7B7" Background="#FFFFFFFF" >
                    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Rectangle x:Name="rectangle" RenderTransformOrigin="0.5,0.5" Fill="#FFB7B7B7" Width="2" Height="10">
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform Angle="-45"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                        <Rectangle x:Name="rectangle1" RenderTransformOrigin="0.5,0.5" Fill="#FFB7B7B7" Width="2" Height="10">
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform Angle="45"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                    </Grid>
                </Border>
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused"/>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled"/>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
            </Grid>
        </ControlTemplate>


        <Style x:Key="PopupStyle" TargetType="ContentControl">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border x:Name="overlay" Background="#A9000000" Padding="50,50,50,50" Opacity="0" >
                            <Border.Triggers>
                                <EventTrigger RoutedEvent="Border.Loaded">
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="overlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="box" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
                                                <SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,0.5"/>
                                                <SplinePointKeyFrame KeyTime="00:00:00.3000000" Value="0.5,0.5"/>
                                                <SplinePointKeyFrame KeyTime="00:00:00.9000000" Value="0.5,0.5"/>
                                            </PointAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="box" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" KeySpline="0.5,0,0.5,1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="box" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" KeySpline="0.5,0,0.5,1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </EventTrigger>
                            </Border.Triggers>
                            <Border x:Name="box" HorizontalAlignment="Center" VerticalAlignment="Center" Background="#FFFFFFFF" CornerRadius="12,12,12,12" MinHeight="200" MinWidth="200" RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Border.RenderTransform>
                                <Grid x:Name="grid">
                                    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="15,15,15,15" />
                                    <Button Cursor="Hand"  HorizontalAlignment="Right" Width="Auto" Behaviors:ButtonBehaviors.CloseAncestorPopup="true" VerticalAlignment="Top" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}" BorderThickness="0,0,0,0" Template="{StaticResource CloseButtonStyle}" Margin="15,15,15,15"/>
                                </Grid>
                            </Border>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <Style x:Key="CustomGridRowStyle" TargetType="data:DataGridRow">
            <Setter Property="IsTabStop" Value="False" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="data:DataGridRow">
                        <DataPrimitives:DataGridFrozenGrid x:Name="Root" Margin="0,4,0,0">
                            <DataPrimitives:DataGridFrozenGrid.Resources>
                                <Storyboard x:Key="DetailsVisibleTransition">
                                    <DoubleAnimation Storyboard.TargetName="DetailsPresenter" Storyboard.TargetProperty="ContentHeight" Duration="00:00:0.1" />
                                </Storyboard>
                            </DataPrimitives:DataGridFrozenGrid.Resources>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition GeneratedDuration="0" />
                                    </vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualState x:Name="Normal" />
                                    <vsm:VisualState x:Name="Normal AlternatingRow">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                            <ColorAnimation BeginTime="00:00:00" Duration="0" Storyboard.TargetName="BorderRow" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="Transparent" />
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To=".4"/>
                                            <ColorAnimation BeginTime="00:00:00" Duration="0" Storyboard.TargetName="BorderRow" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#c5d7e5" />
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Normal Selected">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                            <ColorAnimation BeginTime="00:00:00" Duration="0" Storyboard.TargetName="BorderRow" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#99B4C6" />
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="MouseOver Selected">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To=".4"/>
                                            <ColorAnimation BeginTime="00:00:00" Duration="0" Storyboard.TargetName="BorderRow" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#c5d7e5" />
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <DataPrimitives:DataGridFrozenGrid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </DataPrimitives:DataGridFrozenGrid.RowDefinitions>
                            <DataPrimitives:DataGridFrozenGrid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </DataPrimitives:DataGridFrozenGrid.ColumnDefinitions>
                            <Rectangle x:Name="BackgroundRectangle" RadiusX="8" RadiusY="8" Grid.RowSpan="2" Grid.ColumnSpan="2" Opacity="0" Fill="SteelBlue"/>
                            <DataPrimitives:DataGridRowHeader Grid.RowSpan="3" x:Name="RowHeader" DataPrimitives:DataGridFrozenGrid.IsFrozen="True" BorderThickness="0,0,0,0" />
                            <Border CornerRadius="8" Grid.Column="1" x:Name="BorderRow" Opacity="1" Background="White">
                                <DataPrimitives:DataGridCellsPresenter  x:Name="CellsPresenter" DataPrimitives:DataGridFrozenGrid.IsFrozen="True"  />
                            </Border>

                            <DataPrimitives:DataGridDetailsPresenter Grid.Row="1" Grid.Column="1" x:Name="DetailsPresenter" />
                            <Rectangle Grid.Row="2" Grid.Column="1" x:Name="BottomGridLine" HorizontalAlignment="Stretch" Height="1"/>
                        </DataPrimitives:DataGridFrozenGrid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ScrollViewerStyle" TargetType="ScrollViewer">
            <Setter Property="HorizontalContentAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
            <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
            <Setter Property="Padding" Value="4"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ScrollViewer">
                        <Border CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid Background="{TemplateBinding Background}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>

                                <ScrollContentPresenter x:Name="ScrollContentPresenter"
                                    Cursor="{TemplateBinding Cursor}"
                                    Margin="{TemplateBinding Padding}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"/>

                                <Rectangle Grid.Column="1" Grid.Row="1" Fill="#FFE9EEF4"/>

                                <ScrollBar x:Name="VerticalScrollBar" Width="18"
                                    IsTabStop="False"
                                    Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                    Grid.Column="1" Grid.Row="0" Orientation="Vertical"
                                    ViewportSize="{TemplateBinding ViewportHeight}"
                                    Maximum="{TemplateBinding ScrollableHeight}"
                                    Minimum="0"
                                    Value="{TemplateBinding VerticalOffset}"
                                    Style="{StaticResource ScrollBarStyle}"
                                    Margin="0,-1,-1,-1"/>

                                <ScrollBar x:Name="HorizontalScrollBar" Height="18"
                                    IsTabStop="False"
                                    Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                    Grid.Column="0" Grid.Row="1" Orientation="Horizontal"
                                    ViewportSize="{TemplateBinding ViewportWidth}"
                                    Maximum="{TemplateBinding ScrollableWidth}"
                                    Minimum="0"
                                    Value="{TemplateBinding HorizontalOffset}"
                                    Style="{StaticResource ScrollBarStyle}"
                                    Margin="0,-1,-1,-1"/>
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ScrollBarStyle" TargetType="ScrollBar">
            <Setter Property="MinWidth" Value="17"/>
            <Setter Property="MinHeight" Value="17"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ScrollBar">
                        <Grid x:Name="Root">
                            <Grid.Resources>
                                <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                    <Grid x:Name="Root" Background="{x:Null}">
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal"/>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                    <Grid x:Name="Root">
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal"/>
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Rectangle x:Name="Background" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" StrokeThickness="1" Stroke="{x:Null}"/>
                                        <Rectangle x:Name="BackgroundAnimation" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1" Fill="{x:Null}"/>
                                        <Rectangle x:Name="Highlight" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Path Height="8" Width="4" Stretch="Uniform" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z ">
                                            <Path.Fill>
                                                <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}"/>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                    <Grid x:Name="Root">
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal"/>
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Rectangle x:Name="Background" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" StrokeThickness="1" Stroke="{x:Null}"/>
                                        <Rectangle x:Name="BackgroundMouseOver" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundPressed" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1" Fill="{x:Null}"/>
                                        <Rectangle x:Name="Highlight" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Path Height="8" Width="4" Stretch="Uniform" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z ">
                                            <Path.Fill>
                                                <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}"/>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                    <Grid x:Name="Root">
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal"/>
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Rectangle x:Name="Background" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" StrokeThickness="1" Stroke="{x:Null}"/>
                                        <Rectangle x:Name="BackgroundMouseOver" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundPressed" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1" Fill="{x:Null}"/>
                                        <Rectangle x:Name="Highlight" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Path Height="4" Width="8" Stretch="Uniform" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z ">
                                            <Path.Fill>
                                                <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}"/>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                    <Grid x:Name="Root">
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal"/>
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Rectangle x:Name="Background" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" StrokeThickness="1" Stroke="{x:Null}"/>
                                        <Rectangle x:Name="BackgroundMouseOver" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundPressed" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1" Fill="{x:Null}"/>
                                        <Rectangle x:Name="Highlight" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="1" RadiusY="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                        <Path Height="4" Width="8" Stretch="Uniform" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z ">
                                            <Path.Fill>
                                                <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="{x:Null}"/>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                    <Grid>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal"/>
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Grid x:Name="ThumbVisual" Margin="1,0,1,0">
                                            <Rectangle x:Name="Background" RadiusX="2" RadiusY="2" Fill="#FF1F3B53" StrokeThickness="1">
                                                <Rectangle.Stroke>
                                                    <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                        <GradientStop Color="#FF818F99" Offset="1"/>
                                                        <GradientStop Color="#FFC2C9CE" Offset="0"/>
                                                        <GradientStop Color="#FFB3BBC1" Offset="0.35"/>
                                                        <GradientStop Color="#FF96A4B1" Offset="0.35"/>
                                                    </LinearGradientBrush>
                                                </Rectangle.Stroke>
                                            </Rectangle>
                                            <Rectangle x:Name="BackgroundMouseOver" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FF001A3F" Stroke="#00000000" StrokeThickness="1"/>
                                            <Rectangle x:Name="BackgroundPressed" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1"/>
                                            <Rectangle x:Name="BackgroundGradient" Margin="1" RadiusX="1" RadiusY="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                        <GradientStop Color="#FF101010" Offset="0"/>
                                                        <GradientStop Color="#F95B5A5A" Offset="0.375"/>
                                                        <GradientStop Color="#F95B5A5A" Offset="0.6"/>
                                                        <GradientStop Color="#FF101010" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle x:Name="Highlight" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="1" RadiusY="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                    <Grid>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal"/>
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Grid x:Name="ThumbVisual" Margin="0,1,0,1">
                                            <Rectangle x:Name="Background" RadiusX="2" RadiusY="2" Fill="#FF1F3B53" StrokeThickness="1">
                                                <Rectangle.Stroke>
                                                    <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                        <GradientStop Color="#FF818F99" Offset="1"/>
                                                        <GradientStop Color="#FFC2C9CE" Offset="0"/>
                                                        <GradientStop Color="#FFB3BBC1" Offset="0.35"/>
                                                        <GradientStop Color="#FF96A4B1" Offset="0.35"/>
                                                    </LinearGradientBrush>
                                                </Rectangle.Stroke>
                                            </Rectangle>
                                            <Rectangle x:Name="BackgroundMouseOver" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FF001A3F" Stroke="#00000000" StrokeThickness="1"/>
                                            <Rectangle x:Name="BackgroundPressed" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1"/>
                                            <Rectangle x:Name="BackgroundGradient" Margin="1" RadiusX="1" RadiusY="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                        <GradientStop Color="#FF101010" Offset="0.013"/>
                                                        <GradientStop Color="#F95B5A5A" Offset="0.375"/>
                                                        <GradientStop Color="#F95B5A5A" Offset="0.603"/>
                                                        <GradientStop Color="#FF101010" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle x:Name="Highlight" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="1" RadiusY="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </Grid.Resources>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver"/>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HorizontalRoot" Visibility="Visible">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.ColumnSpan="5" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1" Fill="{x:Null}"/>
                                <Rectangle Grid.ColumnSpan="5" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1" Fill="#FF707070" Margin="15,7,15,7"/>
                                <Rectangle Opacity=".375" Grid.ColumnSpan="5" RadiusX="1" RadiusY="1" StrokeThickness="1" Stroke="{x:Null}"/>
                                <Rectangle Margin="1" Grid.ColumnSpan="5" RadiusX="1" RadiusY="1">
                                    <Rectangle.Stroke>
                                        <LinearGradientBrush EndPoint="0.5,.125" StartPoint=".5,.875">
                                            <GradientStop Color="#33FFFFFF"/>
                                            <GradientStop Color="#99FFFFFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Stroke>
                                </Rectangle>
                                <RepeatButton x:Name="HorizontalSmallDecrease" Margin="1" Width="16" IsTabStop="False" Template="{StaticResource HorizontalDecrementTemplate}" Grid.Column="0" Interval="50"/>
                                <RepeatButton x:Name="HorizontalLargeDecrease" Width="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="1" Interval="50"/>
                                <Thumb x:Name="HorizontalThumb" Height="Auto" MinWidth="18" Width="30" Background="{TemplateBinding Background}" Template="{StaticResource HorizontalThumbTemplate}" Grid.Column="2" Margin="0,3,0,3"/>
                                <RepeatButton x:Name="HorizontalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="3" Interval="50"/>
                                <RepeatButton x:Name="HorizontalSmallIncrease" Margin="1" Width="16" IsTabStop="False" Template="{StaticResource HorizontalIncrementTemplate}" Grid.Column="4" Interval="50"/>
                            </Grid>
                            <Grid x:Name="VerticalRoot" Visibility="Collapsed">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Rectangle Fill="#FF707070" Margin="7,15,7,15" Grid.RowSpan="5" RadiusX="1" RadiusY="1" Stroke="{x:Null}" StrokeThickness="1"/>
                                <Rectangle Opacity=".375" Grid.RowSpan="5" RadiusX="1" RadiusY="1" StrokeThickness="1" d:IsHidden="True"/>
                                <Rectangle Stroke="{x:Null}" Margin="1" Grid.RowSpan="5" RadiusX="1" RadiusY="1"/>
                                <RepeatButton x:Name="VerticalSmallDecrease" Height="16" Margin="1" IsTabStop="False" Template="{StaticResource VerticalDecrementTemplate}" Grid.Row="0" Interval="50"/>
                                <RepeatButton x:Name="VerticalLargeDecrease" Height="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="1" Interval="50"/>
                                <Thumb x:Name="VerticalThumb" Height="30" Margin="3,0,3,0" MinHeight="18" Width="Auto" Template="{StaticResource VerticalThumbTemplate}" Grid.Row="2"/>
                                <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="3" Interval="50"/>
                                <RepeatButton x:Name="VerticalSmallIncrease" Height="16" Margin="1" IsTabStop="False" Template="{StaticResource VerticalIncrementTemplate}" Grid.Row="4" Interval="50"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <!-- transaction button styles -->
        <LinearGradientBrush x:Key="SubmitButtonEnabledBG" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF006C3B" Offset="0.163"/>
            <GradientStop Color="#FF00A04D" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="SubmitButtonDisabledBG" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF6C6C6C" Offset="0.163"/>
            <GradientStop Color="#FF9F9F9F" Offset="1"/>
        </LinearGradientBrush>

        <ControlTemplate x:Key="SubmitButtonTemplate" TargetType="Button">
            <Grid Height="{TemplateBinding Height}">
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.3"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused"/>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition GeneratedDuration="00:00:00.3" />
                            <vsm:VisualTransition From="Disabled" GeneratedDuration="00:00:00.3000000" To="Normal"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="Normal">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF6C6C6C"/>
                                    <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FEFFFFFF"/>
                                    <SplineColorKeyFrame KeyTime="00:00:01" Value="#FF006C3B"/>
                                </ColorAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(FrameworkElement.Width)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="105"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="9" KeySpline="0.5,0,0.5,1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="105" KeySpline="0.5,0,0.5,1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled">

                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF006C3B"/>
                                    <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FEFFFFFF"/>
                                    <SplineColorKeyFrame KeyTime="00:00:01" Value="#FF6C6C6C"/>
                                </ColorAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(FrameworkElement.Width)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="105"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="9" KeySpline="0.5,0,0.5,1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="105" KeySpline="0.5,0,0.5,1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <Border Width="105" x:Name="BgEnabled" Background="#FF006C3B" BorderBrush="#FFFFFFFF" BorderThickness="2,2,1,2" CornerRadius="9,0,0,9">
                    <TextBlock x:Name="textBlock" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFFFF" />
                </Border>
            </Grid>
        </ControlTemplate>
        <ControlTemplate x:Key="CancelButtonTemplate" TargetType="Button">
            <Grid Height="{TemplateBinding Height}">
                <Border Width="105" BorderBrush="#FFFFFFFF" BorderThickness="1,2,2,2" CornerRadius="0,9,9,0" Background="#FFFFFFFF"></Border>
                <TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF666666" Margin="-9,0,0,0" />
            </Grid>
        </ControlTemplate>

        <SolidColorBrush x:Key="CustomGridHeadingTextColor" Color="#FFFFFFFF"/>
        <SolidColorBrush x:Key="UnselectedButton" Color="#FFADADAD"/>
        <SolidColorBrush x:Key="SelectedButton" Color="#FFFFFFFF"/>
        <LinearGradientBrush x:Key="GridHdrMainBG" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF292A2A"/>
            <GradientStop Color="#FF707174" Offset="1"/>
        </LinearGradientBrush>
        <ControlTemplate x:Key="TextButton" TargetType="Button">
            <Grid>
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused"/>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard/>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(TextBlock.FontSize)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="11"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="12"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled"/>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{TemplateBinding Content}" TextWrapping="Wrap" FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" Foreground="{TemplateBinding Foreground}" x:Name="textBlock"/>

            </Grid>
        </ControlTemplate>
        <ControlTemplate x:Key="TransactionCommitButton" TargetType="Button">
            <Grid>
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused"/>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard/>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(TextBlock.FontSize)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="12"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="12"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled"/>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{TemplateBinding Content}" TextWrapping="Wrap" FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" Foreground="{TemplateBinding Foreground}" x:Name="textBlock"/>

            </Grid>
        </ControlTemplate>
        <SolidColorBrush x:Key="BorderBackground" Color="#99FFFFFF"/>
        <SolidColorBrush x:Key="FormText" Color="#FF323232"/>
        <Style x:Key="BuyTransactionChecklist" TargetType="CheckBox">
            <Setter Property="Background" Value="#FF448DCA"/>
            <Setter Property="Foreground" Value="#FF000000"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="CheckBox">
                        <Grid>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddleBackground" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddleBackground" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0.55"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="CheckStates">
                                    <vsm:VisualState x:Name="Checked">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unchecked"/>
                                    <vsm:VisualState x:Name="Indeterminate">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentFocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unfocused"/>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="16"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Rectangle Height="14" Margin="1" x:Name="Background" Width="14" Fill="#FFFFFFFF" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" RadiusX="1" RadiusY="1"/>
                                <Rectangle Height="14" Margin="1" x:Name="BackgroundOverlay" Width="14" Opacity="0" Fill="#FFC4DBEE" Stroke="#00000000" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                <Rectangle Height="10" x:Name="BoxMiddleBackground" Width="10" Fill="{TemplateBinding Background}" Stroke="#00000000" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                <Rectangle Height="10" x:Name="BoxMiddle" Width="10" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                    <Rectangle.Stroke>
                                        <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                            <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="0.375"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="0.375"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Stroke>
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.64,0.88" StartPoint="0.62,0.15">
                                            <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                            <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                            <GradientStop Color="#EAFFFFFF" Offset="0.603"/>
                                            <GradientStop Color="#D8FFFFFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Height="10" x:Name="BoxMiddleLine" Width="10" Opacity=".2" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                <Path Height="10" Margin="1,1,0,1.5" x:Name="CheckIcon" Width="10.5" Opacity="0" Fill="#FF333333" Stretch="Fill" Data="M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z"/>
                                <Rectangle Height="2" x:Name="IndeterminateIcon" Width="6" Opacity="0" Fill="#FF333333"/>
                                <Rectangle Height="14" x:Name="DisabledVisualElement" Width="14" Opacity="0" Fill="#FFFFFFFF" RadiusX="1" RadiusY="1"/>
                                <Rectangle Height="16" x:Name="ContentFocusVisualElement" Width="16" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                            </Grid>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="CustomDataGridStyle" TargetType="data:DataGrid">
            <Setter Property="RowBackground" Value="#AAEAEFF4"/>
            <Setter Property="AlternatingRowBackground" Value="#00FFFFFF"/>
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="HeadersVisibility" Value="Column"/>
            <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="SelectionMode" Value="Extended"/>
            <Setter Property="CanUserReorderColumns" Value="True"/>
            <Setter Property="CanUserResizeColumns" Value="True"/>
            <Setter Property="CanUserSortColumns" Value="True"/>
            <Setter Property="AutoGenerateColumns" Value="True"/>
            <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="DragIndicatorStyle">
                <Setter.Value>
                    <Style TargetType="ContentControl">
                        <Setter Property="FontSize" Value="10.5"/>
                        <Setter Property="FontWeight" Value="Bold"/>
                        <Setter Property="Foreground" Value="#7FFFFFFF"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="ContentControl">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*"/>
                                            <RowDefinition Height="*"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Grid.RowSpan="2" Fill="{x:Null}" Stretch="Fill"/>
                                        <Rectangle x:Name="BackgroundGradient" Fill="{x:Null}" Opacity="1" Grid.ColumnSpan="2" Grid.RowSpan="2" Stretch="Fill"/>
                                        <ContentPresenter Margin="4,4,5,4" VerticalAlignment="Center"/>
                                        <Rectangle VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Column="2" Grid.RowSpan="2" />
                                        <Path HorizontalAlignment="Left" x:Name="SortIcon" VerticalAlignment="Center" Width="8" Opacity="0" RenderTransformOrigin=".5,.5" Grid.Column="1" Fill="#7FFFFFFF" Stretch="Uniform" Data="F1 M -5.215,0.0L 5.215,0.0L 0,6.099L -5.215,0.0 Z ">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform ScaleX=".9" ScaleY=".9"/>
                                                    <RotateTransform x:Name="SortIconTransform"/>
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Setter.Value>
            </Setter>
            <Setter Property="DropLocationIndicatorStyle">
                <Setter.Value>
                    <Style TargetType="Control">
                        <Setter Property="Background" Value="#FF3F4346"/>
                        <Setter Property="Width" Value="2"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="Control">
                                    <Rectangle Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Fill="{TemplateBinding Background}"/>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Setter.Value>
            </Setter>
            <Setter Property="GridLinesVisibility" Value="Vertical"/>
            <Setter Property="HorizontalGridLinesBrush" Value="#FFC9CACA"/>
            <Setter Property="IsTabStop" Value="True"/>
            <Setter Property="VerticalGridLinesBrush" Value="#FFC9CACA"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="data:DataGrid">
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                            <Grid x:Name="Root" Background="{TemplateBinding Background}">
                                <Grid.Resources>
                                    <ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="DataPrimitives:DataGridColumnHeader">
                                        <Grid x:Name="Root">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="*"/>
                                                <RowDefinition Height="*"/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border Grid.RowSpan="2" Background="#FF1F3B53" BorderBrush="#FFC9CACA" BorderThickness="0,0,1,0">
                                                <Rectangle Stretch="Fill" StrokeThickness="1">
                                                    <Rectangle.Fill>
                                                        <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                            <GradientStop Color="#FFFFFFFF" Offset="0.015"/>
                                                            <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                            <GradientStop Color="#E5FFFFFF" Offset="0.6"/>
                                                            <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Rectangle.Fill>
                                                </Rectangle>
                                            </Border>
                                            <Rectangle Height="1" VerticalAlignment="Bottom" Width="Auto" Grid.RowSpan="2" Fill="#FFDBDCDC" StrokeThickness="1"/>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="DataPrimitives:DataGridColumnHeader">
                                        <Grid x:Name="RootElement">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="*"/>
                                                <RowDefinition Height="*"/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border Grid.RowSpan="2" Background="#FF1F3B53" BorderBrush="#FFC9CACA" BorderThickness="1,0,0,0">
                                                <Rectangle Stretch="Fill">
                                                    <Rectangle.Fill>
                                                        <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                            <GradientStop Color="#FFFFFFFF" Offset="0.015"/>
                                                            <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                            <GradientStop Color="#E5FFFFFF" Offset="0.6"/>
                                                            <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Rectangle.Fill>
                                                </Rectangle>
                                            </Border>
                                        </Grid>
                                    </ControlTemplate>
                                </Grid.Resources>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Border CornerRadius="12,12,12,12" Background="{StaticResource GridHdrMainBG}" HorizontalAlignment="Stretch" Padding="5,5,5,5" Grid.ColumnSpan="3" >
                                    <Grid Width="Auto" HorizontalAlignment="Stretch">
                                        <DataPrimitives:DataGridColumnHeader x:Name="TopLeftCornerHeader" Width="22" Template="{StaticResource TopLeftHeaderTemplate}" HorizontalAlignment="Left" SeparatorBrush="{x:Null}"/>
                                        <DataPrimitives:DataGridColumnHeadersPresenter x:Name="ColumnHeadersPresenter"/>
                                        <DataPrimitives:DataGridColumnHeader x:Name="TopRightCornerHeader" Template="{StaticResource TopRightHeaderTemplate}" HorizontalAlignment="Left" Width="0" SeparatorBrush="{x:Null}"/>
                                        <Rectangle Height="1" x:Name="ColumnHeadersAndRowsSeparator" VerticalAlignment="Top" Width="Auto" Fill="{x:Null}" StrokeThickness="1" Margin="0,0,0,0" />
                                    </Grid>
                                </Border>
                                <DataPrimitives:DataGridRowsPresenter x:Name="RowsPresenter" Grid.ColumnSpan="2" Grid.Row="1"/>
                                <Rectangle x:Name="BottomRightCorner" Grid.Column="2" Grid.Row="2" />
                                <Rectangle x:Name="BottomLeftCorner" Grid.ColumnSpan="2" Grid.Row="2" />
                                <ScrollBar Margin="0,-1,-1,-1" x:Name="VerticalScrollbar" Width="18" Grid.Column="2" Grid.Row="1" Orientation="Vertical"  Style="{StaticResource ScrollBarStyle}"/>                                
                                <Grid Grid.Column="1" Grid.Row="2">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Rectangle x:Name="FrozenColumnScrollBarSpacer"/>
                                    <ScrollBar Height="18" Margin="-1,0,-1,-1" x:Name="HorizontalScrollbar" Grid.Column="1" Orientation="Horizontal"/>
                                </Grid>
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="CustomHeaderStyle" TargetType="DataPrimitives:DataGridColumnHeader">
            <Setter Property="Foreground" Value="{StaticResource CustomGridHeadingTextColor}"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="FontSize" Value="10.5"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="SeparatorBrush" Value="#FFC9CACA"/>
            <Setter Property="Padding" Value="4,4,5,4"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="DataPrimitives:DataGridColumnHeader">
                        <Grid x:Name="Root">
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition GeneratedDuration="00:00:0.1"/>
                                    </vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard/>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="SortStates">
                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition GeneratedDuration="00:00:0.1"/>
                                    </vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualState x:Name="Unsorted"/>
                                    <vsm:VisualState x:Name="SortAscending">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1.0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="SortDescending">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1.0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SortIconTransform" Storyboard.TargetProperty="ScaleY">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="-.9"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Grid.RowSpan="2" Width="0" Stretch="Fill"/>
                            <Rectangle Fill="{x:Null}" x:Name="BackgroundGradient" Grid.ColumnSpan="2" Grid.RowSpan="2" Stretch="Fill"/>
                            <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.RowSpan="2" Content="{TemplateBinding Content}"/>
                            <Rectangle x:Name="VerticalSeparator" VerticalAlignment="Stretch" Width="1" Visibility="{TemplateBinding SeparatorVisibility}" Grid.Column="2" Grid.RowSpan="2"/>
                            <Path HorizontalAlignment="Left" x:Name="SortIcon" VerticalAlignment="Center" Width="8" Opacity="0" RenderTransformOrigin=".5,.5" Grid.Column="1" Grid.RowSpan="2" Stretch="Uniform" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX=".9" ScaleY=".9" x:Name="SortIconTransform"/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="NoSelectionDataGridCellStyle" TargetType="data:DataGridCell">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Cursor" Value="Arrow"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="data:DataGridCell">
                        <Grid x:Name="Root" Background="Transparent">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle HorizontalAlignment="Stretch" x:Name="FocusVisual" VerticalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" Fill="#66FFFFFF" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="12" RadiusY="12"/>
                            <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                            <Rectangle x:Name="RightGridLine" VerticalAlignment="Stretch" Width="1" Grid.Column="1"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="headerBarBG" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF284292"/>
            <GradientStop Color="#FF2175B8" Offset="0.26499998569488525"/>
        </LinearGradientBrush>

        <Style x:Key="CustomTextBox" TargetType="TextBox">
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Background" Value="#263B3B3B"/>
            <Setter Property="Foreground" Value="#FF000000"/>
            <Setter Property="Padding" Value="2"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Grid x:Name="RootElement">
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF99C1E2"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="ReadOnly">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ReadOnlyVisualElement" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unfocused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Border x:Name="Border" Opacity="1" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,0,0,0" Background="{TemplateBinding Background}" BorderBrush="#FF262626">
                                <Grid>
                                    <Border x:Name="ReadOnlyVisualElement" Opacity="0" Background="#72F7F7F7"/>
                                    <Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
                                        <ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}"/>
                                    </Border>
                                </Grid>
                            </Border>
                            <Border x:Name="DisabledVisualElement" IsHitTestVisible="False" Opacity="0" Background="#A5F7F7F7" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}"/>
                            <Border x:Name="FocusVisualElement" Margin="1" IsHitTestVisible="False" Opacity="0" BorderBrush="#FF002933" BorderThickness="{TemplateBinding BorderThickness}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="CustomComboBox" TargetType="ComboBox">
            <Setter Property="Padding" Value="6,2,25,2"/>
            <Setter Property="Background" Value="#FF1F3B53"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="TabNavigation" Value="Once"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ComboBox">
                        <Grid>
                            <Grid.Resources>
                                <Style x:Name="comboToggleStyle" TargetType="ToggleButton">
                                    <Setter Property="Foreground" Value="#FF333333"/>
                                    <Setter Property="Background" Value="#FF1F3B53"/>
                                    <Setter Property="BorderBrush">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                                <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                                <GradientStop Color="#FF718597" Offset="0.375"/>
                                                <GradientStop Color="#FF617584" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="BorderThickness" Value="1"/>
                                    <Setter Property="Padding" Value="3"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="ToggleButton">
                                                <Grid>
                                                    <vsm:VisualStateManager.VisualStateGroups>
                                                        <vsm:VisualStateGroup x:Name="CommonStates">
                                                            <vsm:VisualState x:Name="Normal"/>
                                                            <vsm:VisualState x:Name="MouseOver">
                                                                <Storyboard>
                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay" Storyboard.TargetProperty="Opacity">
                                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BackgroundGradient2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)">
                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.645"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BackgroundGradient2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                </Storyboard>
                                                            </vsm:VisualState>
                                                            <vsm:VisualState x:Name="Pressed">
                                                                <Storyboard>
                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay2" Storyboard.TargetProperty="Opacity">
                                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BackgroundOverlay2" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                                        <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                </Storyboard>
                                                            </vsm:VisualState>
                                                            <vsm:VisualState x:Name="Disabled"/>
                                                        </vsm:VisualStateGroup>
                                                        <vsm:VisualStateGroup x:Name="CheckStates">
                                                            <vsm:VisualState x:Name="Checked">
                                                                <Storyboard>
                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay3" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient2" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF6C6C6C"/>
                                                                    </ColorAnimationUsingKeyFrames>
                                                                </Storyboard>
                                                            </vsm:VisualState>
                                                            <vsm:VisualState x:Name="Unchecked"/>
                                                        </vsm:VisualStateGroup>
                                                        <vsm:VisualStateGroup x:Name="FocusStates">
                                                            <vsm:VisualState x:Name="Focused">
                                                                <Storyboard>
                                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                                            <DiscreteObjectKeyFrame.Value>
                                                                                <Visibility>Visible</Visibility>
                                                                            </DiscreteObjectKeyFrame.Value>
                                                                        </DiscreteObjectKeyFrame>
                                                                    </ObjectAnimationUsingKeyFrames>
                                                                </Storyboard>
                                                            </vsm:VisualState>
                                                            <vsm:VisualState x:Name="Unfocused"/>
                                                        </vsm:VisualStateGroup>
                                                    </vsm:VisualStateManager.VisualStateGroups>
                                                    <Rectangle x:Name="Background" RadiusX="0" RadiusY="0" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                    <Rectangle x:Name="BackgroundOverlay" Opacity="0" RadiusX="0" RadiusY="0" Fill="#FFD5D7D8" Stroke="#00000000" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                    <Rectangle x:Name="BackgroundOverlay2" Opacity="0" RadiusX="0" RadiusY="0" Fill="#FFC9CBCC" Stroke="#00000000" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                    <Rectangle x:Name="BackgroundGradient" Margin="{TemplateBinding BorderThickness}" RadiusX="0" RadiusY="0" Stroke="#FFFFFFFF" StrokeThickness="1">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                                <GradientStop Color="#FFABABAB" Offset="0"/>
                                                                <GradientStop Color="#FFABABAB" Offset="0.363"/>
                                                                <GradientStop Color="#FFABABAB" Offset="0.625"/>
                                                                <GradientStop Color="#FFABABAB" Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>
                                                    <Rectangle x:Name="BackgroundOverlay3" Opacity="0" RadiusX="0" RadiusY="0" Fill="#FF9F9F9F" Stroke="#00000000" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                    <Rectangle x:Name="BackgroundGradient2" Margin="{TemplateBinding BorderThickness}" Opacity="0" RadiusX="0" RadiusY="0" Stroke="#FFFFFFFF" StrokeThickness="1">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                                <GradientStop Color="#FF6C6C6C" Offset="0.009"/>
                                                                <GradientStop Color="#FF6C6C6C" Offset="0.375"/>
                                                                <GradientStop Color="#FF6C6C6C" Offset="0.625"/>
                                                                <GradientStop Color="#FF6C6C6C" Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>
                                                    <Rectangle x:Name="Highlight" Margin="{TemplateBinding BorderThickness}" IsHitTestVisible="false" Opacity="0" RadiusX="0" RadiusY="0" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                                    <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                    <Rectangle x:Name="FocusVisualElement" Margin="1" IsHitTestVisible="false" Visibility="Collapsed" RadiusX="0" RadiusY="0" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </Grid.Resources>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver"/>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value=".55"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFB5B5B5"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unfocused">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF535353"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="FocusedDropDown">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="PopupBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF808080"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Border x:Name="ContentPresenterBorder">
                                <Grid>
                                    <ToggleButton x:Name="DropDownToggle" HorizontalAlignment="Stretch" Margin="0" Style="{StaticResource comboToggleStyle}" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" HorizontalContentAlignment="Right" Background="#FF000000">
                                        <ToggleButton.BorderBrush>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FF3D3D3D"/>
                                                <GradientStop Color="#FF5B5B5B" Offset="0.375"/>
                                                <GradientStop Color="#FF646464" Offset="0.611"/>
                                                <GradientStop Color="#FF3D3D3D" Offset="1"/>
                                            </LinearGradientBrush>
                                        </ToggleButton.BorderBrush>
                                        <Path x:Name="BtnArrow" Height="4" HorizontalAlignment="Right" Margin="0,0,6,0" Width="8" Stretch="Uniform" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z ">
                                            <Path.Fill>
                                                <SolidColorBrush x:Name="BtnArrowColor" Color="#FF2C2C2C"/>
                                            </Path.Fill>
                                        </Path>
                                    </ToggleButton>
                                    <ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                        <TextBlock Text=" "/>
                                    </ContentPresenter>
                                </Grid>
                            </Border>
                            <Rectangle x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" RadiusX="0" RadiusY="0" Fill="#7FFFFFFF"/>
                            <Rectangle x:Name="FocusVisualElement" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="0" RadiusY="0" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                            <Popup x:Name="Popup">
                                <Border x:Name="PopupBorder" Height="Auto" HorizontalAlignment="Stretch" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,0,0,0">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#CCA7A7A7" Offset="0"/>
                                            <GradientStop Color="#FFA7A7A7" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Padding="1">
                                        <ItemsPresenter/>
                                    </ScrollViewer>
                                </Border>
                            </Popup>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <Style x:Key="CustomRadioCheckbox" TargetType="RadioButton">
            <Setter Property="Background" Value="#FF448DCA"/>
            <Setter Property="Foreground" Value="#FF000000"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="RadioButton">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="16"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddleBackground" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddleBackground" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BoxMiddle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0.55"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="CheckStates">
                                    <vsm:VisualState x:Name="Checked">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unchecked">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentFocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unfocused"/>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Ellipse x:Name="Background" Height="14" Margin="1" Width="14" Fill="#FFFFFFFF" StrokeThickness="{TemplateBinding BorderThickness}" Stroke="#FF3B3B3B"/>
                                <Ellipse x:Name="BackgroundOverlay" Height="14" Margin="1" Width="14" Opacity="0" Fill="#FFC4DBEE" Stroke="#00000000" StrokeThickness="1"/>
                                <Ellipse x:Name="BoxMiddleBackground" Height="10" Width="10" Stroke="#00000000" StrokeThickness="1" Fill="#FFBFCCD6"/>
                                <Ellipse x:Name="BoxMiddle" Height="10" Width="10" StrokeThickness="1">
                                    <Ellipse.Fill>
                                        <LinearGradientBrush EndPoint="0.64,0.88" StartPoint="0.62,0.15">
                                            <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                            <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                            <GradientStop Color="#EAFFFFFF" Offset="0.603"/>
                                            <GradientStop Color="#D8FFFFFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Ellipse.Fill>
                                    <Ellipse.Stroke>
                                        <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                            <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="0.375"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="0.375"/>
                                        </LinearGradientBrush>
                                    </Ellipse.Stroke>
                                </Ellipse>
                                <Ellipse x:Name="BoxMiddleLine" Height="10" Width="10" Opacity=".2" Stroke="#FF333333" StrokeThickness="1"/>
                                <Path Height="8" x:Name="CheckIcon" Width="8" Opacity="0" Fill="#FF333333" Stretch="Fill" Data="M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z" Canvas.ZIndex="0"/>
                                <Ellipse x:Name="DisabledVisualElement" Height="14" Width="14" Opacity="0" Fill="#FFFFFFFF"/>
                                <Ellipse x:Name="ContentFocusVisualElement" Height="16" Width="16" IsHitTestVisible="false" Opacity="0" Stroke="#FF3B3B3B" StrokeThickness="1"/>
                            </Grid>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Grid.Column="1"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="TextBlockSectionTitle" TargetType="TextBlock">
            <Setter Property="FontFamily" Value="Trebuchet MS"/>
            <Setter Property="FontSize" Value="11" />
            <Setter Property="FontWeight" Value="Normal" />
            <Setter Property="Foreground" Value="#FF1B75BB" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="TextAlignment" Value="Left" />
            <Setter Property="Margin" Value="0,0,0,12" />
        </Style>


    </Application.Resources>
</Application>
